package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Controller
@RequestMapping("/return")
public class ReturnController {
    @RequestMapping("/r1")
    public String r1(){
        return "/index.html";
    }

    @ResponseBody
    @RequestMapping("/r3")
    public String r3(){
        return "<h1>我是返回的片段</h1>";
    }
}